<template>
	<view class="teachmain">
			<view class="cu-custom" :style="{height: $wanlshop.wanlsys().height + 'px' }">
				<view class="cu-bar fixed" >
					<view class="action" @tap="$wanlshop.back(1)">
						<text class="wlIcon-fanhui1"></text>
					</view>
					<view class="content" :style="{top: $wanlshop.wanlsys().top + 'px'}">
						<!-- 考试复习 -->
					</view>
					<!-- <view class="action" @tap="showModal('share')">
						<text class="wlIcon wlIcon-fenxiang"></text>
					</view> -->
				</view>
			</view>
			<view v-for="(i,n) in examList" :key='n' @tap="$wanlshop.on('/pages/teacher/practiceInfo?id='+i.id)" class="examItem">
				{{i.name}}
				
			</view>
	</view>
</template>

<script>
	import {
		mapState,
		mapActions
	} from 'vuex';
	import wanlShopPage from '@/components/wanl-shop/page';
	import wanlShopFind from '@/components/wanl-shop/find';
	import wanlShopCategory from '@/components/wanl-shop/category';

	export default {
		components: {
			wanlShopPage,
			wanlShopFind,
			wanlShopCategory
		},
		computed: {
			...mapState(['common', 'user', 'update'])
		},

		data() {
			return {
				headHeight: 75,
				windowHeight: 0,
				examList:[],
				headTop: 0,
				page:1,
				value:'1',
				teacherList:[],
				contentText: {
					contentdown: '下拉加载更多',
					contentrefresh: '加载中',
					contentnomore: '我是有底线的'
				}
			};
		},
		onShow() {
			// #ifdef APP-PLUS
			plus.navigator.setFullscreen(false);
			// #endif
			// 计算页面尺寸
			let sys = this.$wanlshop.wanlsys();
			this.headTop = sys.top;
			this.headHeight = sys.height + uni.upx2px(60);
			this.windowHeight = sys.windowHeight;
			setTimeout(() => {
				uni.setNavigationBarColor({
					frontColor: this.$store.state.common.modulesData.homeModules.page ?
						this.$store.state.common.modulesData.homeModules.page.style
						.navigationBarTextStyle : '',
					backgroundColor: this.$store.state.common.modulesData.homeModules.page ?
						this.$store.state.common.modulesData.homeModules.page.style
						.navigationBarBackgroundColor : ''
				});
			}, 200);
			this.getListData()
		},
		onReady() {
			// 判断网络类型
			uni.getNetworkType({
				success: res => {
					if (res.networkType == '2g' || res.networkType == '3g' || res.networkType == '4g') {
						this.$wanlshop.msg('当前使用非WIFI环境，请注意流量使用');
					} else if (res.networkType == 'none') {
						this.$wanlshop.msg('没有网络');
					}
				}
			});
		},
		methods: {
			...mapActions({
				download: 'update/download', // 立即下载
				ignore: 'update/ignore' // 忽略更新
			}),
			change(e) {
				console.log(e);
			},
			getListData(){
				let vm =this
				vm.$api.get({
					url: '/topic_cate/getTopicCateList',
					data:{
						page:vm.page
					},
					success: res => {
						console.log(res)
					vm.examList = res	
						// this.BannerList = res.banner
					}
				})
			},
				
			showMainInf(i){
				let vm =this
				vm.$api.post({
					url: '/experts/info',
					data:{
						experts_id:i.id
					},
					success: res => {
						console.log(res)
						
						// vm.teacherList = res.list.data
						// this.BannerList = res.banner
					}
				}) 	 	
			},
		
		
		
		}
	};
</script>

<style lang="scss">
		
	body{
		background: #fff!important;
	}
	.teachmain{
		background-color: #fff;
		min-height: 100vh;
	}
		
	.cu-custom{
		line-height: 90rpx;
	}
	.examItem{
		width: 690rpx;
		height: 80rpx;
		background: rgba(245, 245, 245, 0.39);
		opacity: 1;
		    margin: 20rpx auto;
		    line-height: 80rpx;
		    padding: 0 20rpx;
		    font-size: 28rpx;
		    font-family: PingFang SC;
		    font-weight: bold;
		    
		    color: #222222;
		    opacity: 1;
	}

	
	
</style>
